package com.qf.service;

import com.qf.dao.UserDao;
import com.qf.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * projectName: wokepase1
 *
 * @author: 强力
 * time: 2021/9/7 16:47
 * description:
 */
@Service
public class UserServiceImpl implements UserService {
    @Autowired
    UserDao userDao;

    @Override
    public User findUserByName(String username) {
        List<User> userList = userDao.findUserByName(username);
        if (userList != null && userList.size()>0) {
            return userList.get(0);
        }
        return null;
    }
}
